<template>
	<view>
		<u-subsection :list="list" :current="current" @change="sectionChange"></u-subsection>
		<!-- <u-sticky bgColor="#fff">
		    <u-tabs :list="list1" itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;"></u-tabs>
		</u-sticky> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				record: [],
				list1: [
					{
				        name: '待支付',
				    }, {
				        name: '待收货',
				    }, {
				        name: '待评论'
				    }, {
				        name: '已完成'
				    }],
				list: ['未付款', '待收货','待评价', '已完成'],
				current: 0
			}
		},
		onLoad(options) {
			this.sectionChange(options.index);
			this.getOrderList(options.index)
		
		},
		methods: {
			sectionChange(index) {
				this.current = index;
			},
			getOrderList(status) {
				this.apis.listOrderByUserId({
					pageNum: data.page,
					pageSize: data.size,
					// status: this.state,
					status: status
				}).then(res => {
					// this.record = [...this.record, ...res.data.list || []];
					this.record = res.data.list
					console.log("获取订单列表信息："+this.record)
					// callback({
					// 	list: this.record,
					// 	total: res.total || 0
					// });
				})
			}
		}
	}
</script>

<style lang="scss">

</style>
